import axios from "axios";
import { Toast } from "vant";
// 轻提醒
// Vue.use(Toast);

// const url="http://121.199.14.205:3000/api"
const http = {
  get(url, params) {
    return new Promise((resolve) => {
      return axios
        .get(url, {
          params: params,
        })
        .then((response) => {
          resolve(response);
        })
        .catch((error) => {
          // 清提示，提示错误信息
          Toast(error);
        });
    });
  },
};
export default http;
